package com.wsx.ones.akka.service;

import com.wsx.ones.akka.domian.AkkaRequest;
import com.wsx.ones.akka.domian.Data;
import com.wsx.ones.akka.domian.Message;

import java.util.concurrent.CompletableFuture;

/**
 * @author wangshuaixin
 * @Title: com.wsx.ones.akka.service.AkkaService
 * @Description: TODO
 * @date 2019/05/10
 */
public interface AkkaService {

    /**
     * 异步的处理机制
     * @param actorName
     * @param num
     * @return
     */
    CompletableFuture<Message> async(String actorName, int num);

    /**
     * 多级actor的处理机制
     * @param request
     * @return
     */
    Data actor(AkkaRequest request);
}
